<?php
/**
 * Created by PhpStorm.
 * User: zsd
 * Date: 2016/11/9
 * Time: 9:11
 * Email:zsd_it@163.com
 */

namespace app\index\controller;

use think\Config;
use think\Db;
use think\Log;

/**
 * Class Codes
 * @package app\index\controller
 *
 * 代码类 ： 叫产品 跟好吧
 */
class Codes extends Home{

    protected $model;

    public function _initialize()
    {
        parent::_initialize();

        $this->model    = Db::connect([], true)->name('data');

    }


    /**
     * 首页内容
     */
    public function index(){

//        $sql    =   'select * from `think_data`';
//        $list   =   $this->model->query($sql);
//dump($list);
//        exit;
//        dump($this->model);
//        return $this->fetch('codes/index');


        $list   =   DB::table('think_data')->where(1)->find();

        dump($list);

    }
}